import { createRouter, createWebHashHistory } from 'vue-router'
import Detection from '../pages/Home/Detection.vue'
import GatAJob from '../pages/Home/GatAJob.vue'
import Security from '../pages/Home/Security.vue'
import Operation from '../pages/Home/Operation.vue'
import Home from '../pages/Home.vue'


const routes: any = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: '默认',
        component: Home,
        children: [{
            path: '/home',
            redirect: '/home/detection'
        }, {
            path: '/home/detection',
            name: '智能检测',
            component: Detection
        },
        {
            path: '/home/gatajob',
            name: '就业态势',
            component: GatAJob
        },
        {
            path: '/home/security',
            name: '安防管理',
            component: Security
        },
        {
            path: '/home/operation',
            name: '运营管理',
            component: Operation
        }]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
})

export default router;